I'm trying to use the autocomplete template, but I cannot find detailed instructions about it...
Let's use the Acme project as reference:
- site view: "Shop"
- page: "Search Products" (the default page for "Shop" with id "page4")
- unit: "Search" (form unit)
- field: "product" (where I would like to show some product name suggestions)
I made the following changes:
- add a new page "Suggestion page" with page template "autocomplete"
- add a simple list "Suggestions" (also with autocomplete template) showing the attribute "name" of the entity "product" with a condition expression like "name Contains ?"
- add an ajax link from the form "Search" to the the simple list "Suggestions", binding the field "product" as input to the condition "name" of the simple list "Suggestions"
- enable ajax for the form
- thicked the "Enable Autocompletion" checkbox for the field "product" of the form
- set "Normal" as "Autocompletion type" ( I actually need to use "Selection field" but I couldn't make it work with either value..)
- set as "Autocompletion flow" the newly created ajax link (from the form to the suggestions)
When I type any letter in the field "product" of the form, ajax fires but gives the following error:
ERROR [wr.nav.Request] Error handling failure of request [object Object] ReferenceError: display is not defined at D.<anonymous>(http://localhost:8080/Acme/WRResources/ajax/webratio/widgets.js?s=ceGDtb2EF9nqow1H-LiC8w:474:46) at o(http://localhost:8080/Acme/WRResources/ajax/jquery/jquery.min.js?s=oT9-IIulNGgd6tsex6LlSg:2:14733) at Object.fireWith(http://localhost:8080/Acme/WRResources/ajax/jquery/jquery.min.js?s=oT9-IIulNGgd6tsex6LlSg:2:15502) at D._triggerListeners(http://localhost:8080/Acme/WRResources/ajax/webratio/wr.js?createDocumentApp=true&s=vzXmSEvUpK553nxIXktpVA:176:202) at D.failure(http://localhost:8080/Acme/WRResources/ajax/webratio/wr.js?createDocumentApp=true&s=vzXmSEvUpK553nxIXktpVA:175:334) at Object.Ie.h.error(http://localhost:8080/Acme/WRResources/ajax/webratio/wr.js?createDocumentApp=true&s=vzXmSEvUpK553nxIXktpVA:284:312) at o(http://localhost:8080/Acme/WRResources/ajax/jquery/jquery.min.js?s=oT9-IIulNGgd6tsex6LlSg:2:14733) at w(http://localhost:8080/Acme/WRResources/ajax/jquery/jquery.min.js?s=oT9-IIulNGgd6tsex6LlSg:4:12497) at XMLHttpRequest.d(http://localhost:8080/Acme/WRResources/ajax/jquery/jquery.min.js?s=oT9-IIulNGgd6tsex6LlSg:4:18318)
What's wrong with it? Did I miss something?
Many thanks
G.